const TOKEN_NAME = 'hm-news-token'
const CHANNEL_NAME = 'hm-news-channel'
export function setStorageChannel(value) {
  localStorage.setItem(CHANNEL_NAME, JSON.stringify(value))
}
export const getStorageChannel = () => {
  return JSON.parse(localStorage.getItem(CHANNEL_NAME))
}
export const getItemToken = () => {
  return JSON.parse(localStorage.getItem(TOKEN_NAME)) || {}
}
export const setItemToken = value => {
  localStorage.setItem(TOKEN_NAME, JSON.stringify(value))
}
export const removeItemToken = () => {
  localStorage.removeItem(TOKEN_NAME)
}
